package com.htfyun.eink.pw.draw.pen;

import android.graphics.Paint;

import androidx.annotation.NonNull;

import com.htfyun.eink.pw.draw.IPWDrawPath;
import com.htfyun.eink.pw.draw.pointer.PWPointer;

/**
 * 固定宽度的笔.
 */
public class PenRandomFixWidth extends PenRandomBase implements IPenWriter {

    public static final String PEN_ID = PenRandomFixWidth.class.getSimpleName();

    @NonNull
    @Override
    public String getPenId() {
        return PEN_ID;
    }

    @Override
    public PenDrawPointerResultEnums pointerDown(@NonNull IPWDrawPath draw, @NonNull PWPointer pointer) {
        return super.pointerDown(draw, pointer);
    }

    @Override
    public void configPaint(@NonNull Paint paintRandom, @NonNull PWPointer pointer) {
        float strokeWidth = paintRandom.getStrokeWidth();
        paintRandom.setStrokeWidth(strokeWidth);
    }

    @Override
    public boolean cacheStrokeWidth() {
        return true;
    }

}
